<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>唯爱薇o朝圣之路</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app">

    </div>
    
</body>
<script>
    Vue.createApp({
        data() {
            return{
                content:"欢迎你来到,唯爱薇o朝圣之路.公益课堂!",
                courses: "DevOps课程，Network Arch课程，NodeJS课程，VUE3课程",
                isShowFlag: false
            }
        },
        methods: {
            learning() {
                this.content = "你进入了学习中心，请选择课程！"
            },
            leaving() {
                this.content = "学习是一生的事情，活着是一生的坚持！"
            },
            changeIsShowFlag() {
                this.isShowFlag =!this.isShowFlag
            }
        },
        template: `<div> 
            
            <h1> {{ content }} </h1>
            <hr/>
            <button v-on:click="learning">进入学习</button>
            <hr/>
            <button v-on:click="leaving">暂时离开</button>
            <hr/>
            <div>
                <div v-if="isShowFlag"> {{ courses }} </div>
                <button v-on:click="changeIsShowFlag">显示/隐藏|课程</button>
            </div>

        
        
        
        
        </div>`

    }).mount("#app")
</script>
</html>